package com.itheima.mapper;

import com.itheima.entity.YddUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface YddUserMapper {

    @Select("select id, username, mobile, sex, password, icon, notes, birthday, address, default_data from ydd_user order by id desc limit 0,5")
    List<YddUser> selectNewUserList();

    @Select("select count(*) from ydd_user")
    Integer selectCount();

    @Select("select count(*) from ydd_user where sex = #{sex}")
    Integer selectCountBySex(int sex);
}
